#ifndef GY_GRAPHICSCIRCLEITEM_H
#define GY_GRAPHICSCIRCLEITEM_H

#include "Graphics/BasicGraphics/GY_BasicsGraphicsObject.h"
#include "GY_ControlLibrary_global.h"
#include <QVariant>
/**
 * @brief The GY_GraphicsCircleItem class 圆形图元基类
 */
class GY_CONTROLLIBRARY_EXPORT GY_GraphicsCircleItem : public GY_BasicsGraphicsObject
{
    Q_OBJECT
public:
    explicit Q_INVOKABLE GY_GraphicsCircleItem(const QString &guid,QGraphicsItem *parent = nullptr);
    explicit Q_INVOKABLE GY_GraphicsCircleItem(const QString &guid,qreal x, qreal y, qreal r, QGraphicsItem *parent = nullptr);


private:
    /**
     * @brief initializationPropertyInfo 初始化属性信息
     */
    void initializationPropertyInfo();
    /**
     * @brief updateCirlePoint  更新中心点
     * @param name 属性名称
     * @param value 中心点位置
     * @return 是否更新成功
     */
    bool updateCirlePoint(const QString &name, const QVariant &value);
    void updatePath(const QPointF &point1);
    bool updatePoint(const QString &name, const QVariant &value);
    bool updateRadius(const QString &name, const QVariant &value);
};

#endif // GY_GRAPHICSCIRCLEITEM_H
